package com.blb.zycommunity.mapper;

import com.blb.zycommunity.entity.SysArea;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 区域表 Mapper 接口
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Mapper
public interface SysAreaMapper extends BaseMapper<SysArea> {

    @Select("SELECT name FROM `sys_area` where code = #{code}")
    String selectAreaNameByCode(long code);

    @Select("SELECT * FROM sys_area")
    List<SysArea> selectAll();
}
